<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../../print.css" type="text/css" media="print">
<meta content="Curve,com.janisRadins.asDraw.Curve,CURVE_ANGLE_PRECISION,CURVE_LENGTH_PRECISION,anchorX,anchorY,controlX,controlY,isStraight,length,visualControlX,visualControlY,clone,getAngleAtPoint,getCrtlPointByPointOnCurve,getCurveSegment,getPointAtPosition,getPointOnCurve,getSegmentByRatio,lengthToRatio,toString,updateValues,updateVisualControlPoint" name="keywords">
<title>com.janisRadins.asDraw.Curve</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'Curve - API Documentation';
				var baseRef = '../../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">API Documentation</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../../all-classes.html')" href="../../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../all-classes.html')" href="../../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../index-list.html')" href="../../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../../index.html?com/janisRadins/asDraw/Curve.html&amp;com/janisRadins/asDraw/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;Curve</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a>&nbsp;| <a href="#eventSummary">Events</a>&nbsp;| <a href="#constantSummary">Constants</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class Curve"); titleBar_setSubNav(true,true,false,false,true,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">com.janisRadins.asDraw</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class Curve</td>
</tr>
<tr>
<td class="classHeaderTableLabel">Inheritance</td><td class="inheritanceList">Curve <img class="inheritArrow" alt="Inheritance" title="Inheritance" src="../../../images/inherit-arrow.gif"> flash.events.EventDispatcher</td>
</tr>
<tr>
<td class="classHeaderTableLabel">Implements</td><td><a href="ICurve.html">ICurve</a></td>
</tr>
</table>
<p></p>
  Basic building block for any vector sequence which incorporates basics of all system 
  functionality
  <p></p>
<br>
<hr>
</div>
<a name="propertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Properties</div>
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#anchorY">anchorY</a> : Number<div class="summaryTableDescription">
   Curve anchor point Y position.</div>
</td><td class="summaryTableOwnerCol">Curve</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#anchorX">anchorX</a> : Number<div class="summaryTableDescription">
   Curve anchor point X position.</div>
</td><td class="summaryTableOwnerCol">Curve</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#controlY">controlY</a> : Number<div class="summaryTableDescription">
   Curve control point Y position.</div>
</td><td class="summaryTableOwnerCol">Curve</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#controlX">controlX</a> : Number<div class="summaryTableDescription">
   Curve control point X position.</div>
</td><td class="summaryTableOwnerCol">Curve</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#isStraight">isStraight</a> : Boolean<div class="summaryTableDescription">[read-only]
   Flag which identify whether Curve is straight line (true) or bended (false)
   </div>
</td><td class="summaryTableOwnerCol">Curve</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#length">length</a> : Number<div class="summaryTableDescription">[read-only]
   Curve length in pixels
   </div>
</td><td class="summaryTableOwnerCol">Curve</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#visualControlY">visualControlY</a> : Number<div class="summaryTableDescription">
   Value of curve visual peak Y
   </div>
</td><td class="summaryTableOwnerCol">Curve</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#visualControlX">visualControlX</a> : Number<div class="summaryTableDescription">
   Value of curve visual peak X
   </div>
</td><td class="summaryTableOwnerCol">Curve</td>
</tr>
</table>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#Curve()">Curve</a>(controlX:Number, controlY:Number, anchorX:Number = 0, anchorY:Number = 0)</div>
<div class="summaryTableDescription">
   Constructor of Curve.</div>
</td><td class="summaryTableOwnerCol">Curve</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#clone()">clone</a>():<a href="../asDraw/Curve.html">Curve</a>
</div>
<div class="summaryTableDescription">
   Creates exact clone of current Curve instance
   </div>
</td><td class="summaryTableOwnerCol">Curve</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#getAngleAtPoint()">getAngleAtPoint</a>(position:<a href="">Number</a>):Number</div>
<div class="summaryTableDescription">
   Method that returns angle in radians on requested curve position
   </div>
</td><td class="summaryTableOwnerCol">Curve</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#getCurveSegment()">getCurveSegment</a>(start:Number, end:Number):GraphicsPath</div>
<div class="summaryTableDescription">
   Method that returns curve segment by length coordinates
   </div>
</td><td class="summaryTableOwnerCol">Curve</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#getPointAtPosition()">getPointAtPosition</a>(position:Number):Point</div>
<div class="summaryTableDescription">
   Method that returns point value on Curve for position requested
   </div>
</td><td class="summaryTableOwnerCol">Curve</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#getPointOnCurve()">getPointOnCurve</a>(position:Number):Point</div>
<div class="summaryTableDescription">
   Method that returns point on Curve by length value;
   </div>
</td><td class="summaryTableOwnerCol">Curve</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#getSegmentByRatio()">getSegmentByRatio</a>(start:Number, end:Number):GraphicsPath</div>
<div class="summaryTableDescription">
   Method that returns GraphicsPath defining curve segment
   </div>
</td><td class="summaryTableOwnerCol">Curve</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#toString()">toString</a>():String</div>
<div class="summaryTableDescription">
   Class toStirng implementation to be witin trace or any other sting representation
   </div>
</td><td class="summaryTableOwnerCol">Curve</td>
</tr>
</table>
</div>
<a name="protectedMethodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Protected Methods</div>
<table id="summaryTableProtectedMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#getCrtlPointByPointOnCurve()">getCrtlPointByPointOnCurve</a>(ratio:Number, startP:Number, pT:Number, endP:Number):Number</div>
<div class="summaryTableDescription">
   Return Control point value by point on curve
   </div>
</td><td class="summaryTableOwnerCol">Curve</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#lengthToRatio()">lengthToRatio</a>(len:Number):Number</div>
<div class="summaryTableDescription">
   Method that converts length value to closest match to Curve ratio
   </div>
</td><td class="summaryTableOwnerCol">Curve</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#updateValues()">updateValues</a>():void</div>
<div class="summaryTableDescription">
   Method which is executed as any of point properies change and determines if this is straight line and 
   calulates Curve length
   </div>
</td><td class="summaryTableOwnerCol">Curve</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#updateVisualControlPoint()">updateVisualControlPoint</a>():void</div>
<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol">Curve</td>
</tr>
</table>
</div>
<a name="eventSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Events</div>
<table id="summaryTableEvent" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Event</th><th>Summary</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#event:change">change</a>
</div>
</td><td class="summaryTableDescription summaryTableCol">
  Event dispathed as any of sub curve properties have been changed.<br>
  This event is cancellable.</td><td class="summaryTableOwnerCol">Curve</td>
</tr>
</table>
</div>
<a name="constantSummary"></a><a name="protectedConstantSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Protected Constants</div>
<table id="summaryTableProtectedConstant" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Constant</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#CURVE_ANGLE_PRECISION">CURVE_ANGLE_PRECISION</a> : Number = 0.001<div class="summaryTableDescription">
   Constant which defines how far the other point for angle calculation should be calculated for angle on Curve method
   </div>
</td><td class="summaryTableOwnerCol">Curve</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#CURVE_LENGTH_PRECISION">CURVE_LENGTH_PRECISION</a> : Number = 0.05<div class="summaryTableDescription">
   Setting how many curve length segments should be calulated in order to calculate
   curve length
   </div>
</td><td class="summaryTableOwnerCol">Curve</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">Property detail</div>
<a name="anchorY"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">anchorY</td><td class="detailHeaderType">property</td>
</tr>
</table>
<div class="detailBody">
<code>anchorY:Number</code>&nbsp;&nbsp;[read-write]<p>
   Curve anchor point Y position.
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get anchorY():Number</code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set anchorY(value:Number):void</code>
<br>
</div>
<a name="anchorX"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">anchorX</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>anchorX:Number</code>&nbsp;&nbsp;[read-write]<p>
   Curve anchor point X position.
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get anchorX():Number</code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set anchorX(value:Number):void</code>
<br>
</div>
<a name="controlY"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">controlY</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>controlY:Number</code>&nbsp;&nbsp;[read-write]<p>
   Curve control point Y position.
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get controlY():Number</code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set controlY(value:Number):void</code>
<br>
</div>
<a name="controlX"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">controlX</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>controlX:Number</code>&nbsp;&nbsp;[read-write]<p>
   Curve control point X position.
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get controlX():Number</code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set controlX(value:Number):void</code>
<br>
</div>
<a name="isStraight"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">isStraight</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>isStraight:Boolean</code>&nbsp;&nbsp;[read-only]<p>
   Flag which identify whether Curve is straight line (true) or bended (false)
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get isStraight():Boolean</code>
<br>
</div>
<a name="length"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">length</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>length:Number</code>&nbsp;&nbsp;[read-only]<p>
   Curve length in pixels
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get length():Number</code>
<br>
</div>
<a name="visualControlY"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">visualControlY</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>visualControlY:Number</code>&nbsp;&nbsp;[read-write]<p>
   Value of curve visual peak Y
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get visualControlY():Number</code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set visualControlY(value:Number):void</code>
<br>
</div>
<a name="visualControlX"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">visualControlX</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>visualControlX:Number</code>&nbsp;&nbsp;[read-write]<p>
   Value of curve visual peak X
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get visualControlX():Number</code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set visualControlX(value:Number):void</code>
<br>
</div>
<a name="constructorDetail"></a>
<div class="detailSectionHeader">Constructor detail</div>
<a name="Curve()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">Curve</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td>
</tr>
</table>
<div class="detailBody">
<code>public function Curve(controlX:Number, controlY:Number, anchorX:Number = 0, anchorY:Number = 0)</code><p>
   Constructor of Curve.
   Each Curve is abstracter from all other curves therefore each Curve thinks it's starting 
   position is at [0, 0]
   Therefor this class should receive only values relative to previouse Curve anchor point.
   Straight lines control point should be set to same value as anchor point. Anyhow this class checks if 
   control point is on same line.
   Pass NaN for controlX and controlY if you want control point to be automatically set to same values as
   anchor point.
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">controlX</span>:Number</code> &mdash; Controll point X value
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">controlY</span>:Number</code> &mdash; Controll point Y value
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">anchorX</span>:Number</code> (default = <code>0</code>)<code></code> &mdash;  Anchor point X value
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">anchorY</span>:Number</code> (default = <code>0</code>)<code></code> &mdash;  Anchor point Y value
   </td>
</tr>
</table>
</div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="clone()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">clone</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>public function clone():<a href="../asDraw/Curve.html">Curve</a></code><p>
   Creates exact clone of current Curve instance
   </p><p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code><a href="../asDraw/Curve.html">Curve</a></code> &mdash; 
                        Curve
   
                        
                     </td>
</tr>
</table>
</div>
<a name="getAngleAtPoint()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">getAngleAtPoint</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function getAngleAtPoint(position:<a href="">Number</a>):Number</code><p>
   Method that returns angle in radians on requested curve position
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">position</span>:<a href="">Number</a></code> &mdash; value in range 0 - curve length
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Number</code> &mdash; Value of curve angle in radians
   </td>
</tr>
</table>
</div>
<a name="getCrtlPointByPointOnCurve()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">getCrtlPointByPointOnCurve</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>protected function getCrtlPointByPointOnCurve(ratio:Number, startP:Number, pT:Number, endP:Number):Number</code><p>
   Return Control point value by point on curve
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">ratio</span>:Number</code> &mdash; Position at which point on curve resists
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">startP</span>:Number</code> &mdash; Curve start position
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">pT</span>:Number</code> &mdash;  Point on curve value
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">endP</span>:Number</code> &mdash; Curve anchor position
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Number</code></td>
</tr>
</table>
</div>
<a name="getCurveSegment()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">getCurveSegment</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function getCurveSegment(start:Number, end:Number):GraphicsPath</code><p>
   Method that returns curve segment by length coordinates
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">start</span>:Number</code> &mdash; Start position of sub curve in range 0 - length
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">end</span>:Number</code> &mdash;  End position of sub curve in range 0 - length
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>GraphicsPath</code> &mdash; A GraphicsPath which defines sub curve
   </td>
</tr>
</table>
</div>
<a name="getPointAtPosition()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">getPointAtPosition</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function getPointAtPosition(position:Number):Point</code><p>
   Method that returns point value on Curve for position requested
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">position</span>:Number</code> &mdash; Value in range 0 - 1 which defines which position should be calculated
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Point</code> &mdash; Point with x and y coordinate of point
   </td>
</tr>
</table>
</div>
<a name="getPointOnCurve()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">getPointOnCurve</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function getPointOnCurve(position:Number):Point</code><p>
   Method that returns point on Curve by length value;
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">position</span>:Number</code></td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Point</code> &mdash; Point with x and y coordinate of point
   </td>
</tr>
</table>
</div>
<a name="getSegmentByRatio()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">getSegmentByRatio</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function getSegmentByRatio(start:Number, end:Number):GraphicsPath</code><p>
   Method that returns GraphicsPath defining curve segment
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">start</span>:Number</code> &mdash; Start position of sub curve. Value must be in range 0 - 1
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">end</span>:Number</code> &mdash;  End position of sub curve. Value must be in range 0 - 1
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>GraphicsPath</code> &mdash; A GraphicsPath which defines sub curve
   </td>
</tr>
</table>
</div>
<a name="lengthToRatio()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">lengthToRatio</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>protected function lengthToRatio(len:Number):Number</code><p>
   Method that converts length value to closest match to Curve ratio
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">len</span>:Number</code> &mdash;  Value in range 0 - length
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Number</code> &mdash; Number
   </td>
</tr>
</table>
</div>
<a name="toString()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">toString</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public override function toString():String</code><p>
   Class toStirng implementation to be witin trace or any other sting representation
   </p><p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>String</code> &mdash; String
   </td>
</tr>
</table>
</div>
<a name="updateValues()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">updateValues</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>protected function updateValues():void</code><p>
   Method which is executed as any of point properies change and determines if this is straight line and 
   calulates Curve length
   </p></div>
<a name="updateVisualControlPoint()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">updateVisualControlPoint</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>protected function updateVisualControlPoint():void</code>
</div>
<div class="detailSectionHeader">Event detail</div>
<a name="event:change"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">change</td><td class="detailHeaderType">event&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<span class="label">Event object type: </span><a href="../asDraw/CurveChangeEvent.html"><code>com.janisRadins.asDraw.CurveChangeEvent</code></a>
<br>
<p></p><p>
  Event dispathed as any of sub curve properties have been changed.<br>
  This event is cancellable. Calling <code>preventDefault()</code> on event will cancel data change.
  </p></div>
<a name="constantDetail"></a>
<div class="detailSectionHeader">Constant detail</div>
<a name="CURVE_ANGLE_PRECISION"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">CURVE_ANGLE_PRECISION</td><td class="detailHeaderType">constant</td>
</tr>
</table>
<div class="detailBody">
<code>protected const CURVE_ANGLE_PRECISION:Number = 0.001</code><p>
   Constant which defines how far the other point for angle calculation should be calculated for angle on Curve method
   </p></div>
<a name="CURVE_LENGTH_PRECISION"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">CURVE_LENGTH_PRECISION</td><td class="detailHeaderType">constant</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>protected const CURVE_LENGTH_PRECISION:Number = 0.05</code><p>
   Setting how many curve length segments should be calulated in order to calculate
   curve length
   </p></div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright"> 
</center>
</div>
</body>
</html>
<!-- -->
